package com.example.vehiclemanagesystem.service.Impl;

import com.example.vehiclemanagesystem.dao.RouteDao;
import com.example.vehiclemanagesystem.entity.Car;
import com.example.vehiclemanagesystem.entity.Route;
import com.example.vehiclemanagesystem.entity.Vehicle;
import com.example.vehiclemanagesystem.service.RouteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RouteServiceImpl implements RouteService {
    @Autowired
    private  RouteDao routeDao;
    @Override
    public Route selectRouteByRouteID(Integer r_id) {
        return routeDao.selectRouteByRouteID(r_id);
    }

    @Override
    public void addNewRoute(Route route) {
        routeDao.addNewRoute(route);
    }

    @Override
    public void updateRoute(Route route) {
        routeDao.updateRoute(route);
    }

    @Override
    public void deleteRoute(Route route) {
        routeDao.deleteRoute(route);
    }

    @Override
    public List<Route> selectRouteAll() {

        return routeDao.selectRouteAll();
    }
}
